


        
          var watchWindowWidth = null;
          $(document).ready(function(){
                if(window.innerWidth > 1400){
                    $('.grid').masonry({gutter:80});
                    $('.grid')[0].gutter = 80;
                }
                else if(window.innerWidth > 1024 && window.innerWidth <= 1400){
                    $('.grid').masonry({gutter:60});
                    $('.grid')[0].gutter = 60;
                }else if(window.innerWidth >= 768 && window.innerWidth <= 1024){
                    $('.grid').masonry({gutter:40});
                    $('.grid')[0].gutter = 40;
                }else{
                    $('.grid').masonry({gutter:0});
                    $('.grid')[0].gutter = 0;
                }
                $('.grid').masonry({
                    itemSelector:'.grid-item',
                    columnWidth:'.grid-sizer',
                    percentPosition:true,
                    resize:true
                });
                watchWindowWidth = setInterval(function(){
                    if(window.innerWidth > 1400){
                        if($('.grid')[0].gutter == 80) return false;
                        $('.grid').masonry({gutter:80});
                        $('.grid')[0].gutter = 80;
                    }
                    else if(window.innerWidth > 1024 && window.innerWidth <= 1400){
                        if($('.grid')[0].gutter == 60) return false;
                        $('.grid').masonry({gutter:60});
                        $('.grid')[0].gutter = 60;
                    }else if(window.innerWidth >= 768 && window.innerWidth <= 1024){
                        if($('.grid')[0].gutter == 40) return false;
                        $('.grid').masonry({gutter:40});
                        $('.grid')[0].gutter = 40;
                    }else{
                        if($('.grid')[0].gutter == 0) return false;
                        $('.grid').masonry({gutter:0});
                        $('.grid')[0].gutter = 0;
                    }
                },10)
                
          })